package guinong.com.gnw.ui.fragement;


import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import guinong.com.gnw.R;
import guinong.com.gnw.base.BaseFragment;
import guinong.com.gnw.ui.widged.MainTabView;
import guinong.com.gnw.ui.widged.PullImageScroView;


public class CenterFragment extends BaseFragment {
    @Bind(R.id.img)
    ImageView mImageView;
    @Bind(R.id.dampview)
    PullImageScroView mPullImageScroView;
    @Bind(R.id.tab_wait_pay)
    MainTabView tabWaitPay;
    @Bind(R.id.tab_wait_goods_send)
    MainTabView tabWaitGoodsSend;
    @Bind(R.id.tab_wait_goods_take)
    MainTabView tabWaitGoodsTake;
    @Bind(R.id.tab_wait_appraise)
    MainTabView tabWaitAppraise;
    @Bind(R.id.tab_wait_drawback)
    MainTabView tabWaitDrawback;


    @Override
    protected int inflateContentView() {
        return R.layout.fragment_center;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void intitView(LayoutInflater inflater, Bundle savedInstanceSate) {
        mPullImageScroView.setImageView(mImageView);
        tabWaitAppraise.setDotText("2");
        tabWaitDrawback.setDotText("3");
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick({R.id.tab_wait_pay, R.id.look_allOrder, R.id.tab_wait_goods_send, R.id.tab_wait_goods_take, R.id.tab_wait_appraise, R.id.tab_wait_drawback})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tab_wait_pay:
                toastShortBasic("待支付");
                break;
            case R.id.tab_wait_goods_send:
                toastShortBasic("待发送");
                break;
            case R.id.tab_wait_goods_take:
                toastShortBasic("代接货");
                break;
            case R.id.tab_wait_appraise:
                toastShortBasic("带评价");
                break;
            case R.id.tab_wait_drawback:
                toastShortBasic("售后");
                break;
            case R.id.look_allOrder:
                toastShortBasic("全部订单");
                break;
        }
    }
}
